<h2>Visar alla användare </h2>

<?php if(strlen($message) > 0 ) :?>
	<span class="message"><?php echo $message;?></span>
<?php endif;?>

<table class='admin_datatable'>
	<thead>
		<tr><td>Epost (användarnamn)</td><td>Händelse</td></tr>
	</thead>
	<tbody>
	<?php foreach($accounts as $user): ?>
		<tr>
			<td>
				<?php echo $user->email;?>
			</td>
			<td>
				<a href='/admin/users/edit/<?php echo $user->id;?>'>Redigera</a> - 
				<a href='/admin/users/remove/<?php echo $user->id;?>' class='delete' onclick='return confirm("Vill du verkligen ta bort användaren?");'>Ta bort</a>
			</td>
		</tr>
	<?php endforeach; ?>
	</tbody>
</table>